package model

type MenuConfig struct {
	Model
	Name     string      `gorm:"comment:菜单名称;type:VARCHAR(255)"`
	Typ      int         `gorm:"comment:分类 0-菜单 1-分组;type:TINYINT(4)"`
	Memo     string      `gorm:"comment:备注;type:VARCHAR(255)"`
	ParentId int         `gorm:"comment:父id;type:INT(11)"`
	Status   LimitStatus `gorm:"comment:状态 0-ok 1-锁定;type:TINYINT(4)"`
	Sequence int         `gorm:"comment:顺序;type:INT(11)"`
	Path     string      `gorm:"comment:路径;type:VARCHAR(255)"`
	Actions  IntSplitStr `gorm:"comment:功能列表;type:TEXT"`
}

type ActionConfig struct {
	Model
	Name   string      `gorm:"comment:菜单名称;type:VARCHAR(255);index"`
	Path   string      `gorm:"comment:URI;type:VARCHAR(255);uniqueIndex:IDX_PATH_METHOD"`
	Method string      `gorm:"comment:HTTP方法;type:VARCHAR(8);uniqueIndex:IDX_PATH_METHOD"`
	Status LimitStatus `gorm:"comment:状态 0-ok 1-锁定;type:TINYINT(4)"`
}
